<%@page import="cn.jussi.dao.BaseDao"%>
<%@page import="cn.jussi.model.User"%>
<%@page import="cn.jussi.mydbutils.MyDBUtils"%>
<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Insert title here</title>
</head>
<body>

	<%
		BaseDao baseDao = new BaseDao();
		//String id = request.getParameter("id");
		//必须取一个与 类属性 一样 的 别名
		String sql = "select username userName, phone_num phoneNum, address address from users where id=?";
		User user = null;
		//user = DBUtils.getOneUser(sql, id);
		//user = DBUtils.getOneData(User.class, sql, id);
		user = baseDao.getOneData(User.class, sql, 3);
	%>	
	
	<%= user %>
	
	
</body>
</html>